#include<iostream>
#include<vector>
using namespace std;
class Solution {
public:
    double calculateTax(vector<vector<int>>& brackets, int income) {
        double tax=0;
        if(brackets[0][0]<=income){tax+=brackets[0][0]*brackets[0][1]*0.01;}
        else return income*brackets[0][1]*0.01;
        for(int i=1;i<brackets.size();++i)
        {
            
            if(income>=brackets[i][0])
            {
                
                tax+=(brackets[i][0]-brackets[i-1][0])*brackets[i][1]*0.01;
            }
            else {
                tax+=(income-brackets[i-1][0])*brackets[i][1]*0.01;
                break;
            }

        }
        return tax;
    }
};
int main()
{
    return 0;
}